home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / bstfiles.zoo / is-abbrv.bst < prev    next >
Text File  |  1991-09-12  |  24KB  |  1,324 lines

  1. %% =====================================================================
  2. %% WARNING: Do NOT edit this file.  It was produced automatically by
  3. %% Nelson H. F. Beebe <beebe@magna.math.utah.edu>
  4. %% from /home/csc-sun/a/sy/beebe/tex/bib/merge/xbtxbst.doc 
  5. %% on Thu Sep 12 10:55:20 MDT 1991
  6. %% =====================================================================
  7.  
  8.  
  9. %% =====================================================================
  10. %%  @BibTeX-style-file{
  11. %%      author          = "Nelson H. F. Beebe",
  12. %%      version         = "1.02",
  13. %%      date            = "12 September 1991",
  14. %%      filename        = "is-abbrv.bst",
  15. %%      address         = "Center for Scientific Computing
  16. %%                         Department of Mathematics
  17. %%                         South Physics Building
  18. %%                         University of Utah
  19. %%                         Salt Lake City, UT 84112
  20. %%                         USA
  21. %%                         Tel: (801) 581-5254",
  22. %%      checksum        = "01025 1323 2986 24396",
  23. %%      email           = "beebe@math.utah.edu (Internet)",
  24. %%      codetable       = "ISO/ASCII",
  25. %%      keywords        = "BibTeX, style, bibliography",
  26. %%      supported       = "yes",
  27. %%      docstring       = "This file is a modification of the standard
  28. %%                         BibTeX btxbst.doc file, or is a .bst file
  29. %%                         derived from that modification.  It contains
  30. %%                         added support for ISBN and ISSN fields, as
  31. %%                         well as for the PERIODICAL entry.  The UNIX C
  32. %%                         preprocessor can be used to extract the
  33. %%                         extensions of the standard styles, as
  34. %%                         follows:
  35. %%
  36. %%                         cpp -P -DPLAIN xbtxbst.doc is-plain.txt
  37. %%                         cpp -P -DUNSRT xbtxbst.doc is-unsrt.txt
  38. %%                         cpp -P -DALPHA xbtxbst.doc is-alpha.txt
  39. %%                         cpp -P -DABBRV xbtxbst.doc is-abbrv.txt
  40. %%
  41. %%                         If desired, a sed script can be used to
  42. %%                         eliminate non-essential comments (this
  43. %%                         reduces the file size by 2/3); a command
  44. %%                         filter step like
  45. %%                                 sed -e '/^%$/d' -e '/^%[^%].*$/d'
  46. %%                         will accomplish that job.
  47. %%
  48. %%                         The checksum field above contains a CRC-16
  49. %%                         checksum as the first value, followed by the
  50. %%                         equivalent of the standard UNIX wc (word
  51. %%                         count) utility output of lines, words, and
  52. %%                         characters.  This is produced by Robert
  53. %%                         Solovay's checksum utility."
  54. %%      }
  55. %% =====================================================================
  56. %% Revision history (reverse time order):
  57. %% 1.02 [12-Sep-1991]
  58. %%      Merge in Barbara N. Beeton's suggestion for hyphen-less
  59. %%      line breaks around volume(number):page.
  60. %% 1.01 [10-Sep-1991]
  61. %%      Update file comment header and use Solovay checksum program.
  62. %% 1.00 [17-Oct-1990]
  63. %%      Original version merging hand-edits of is-xxx.bst files into
  64. %%      this master file, xbtxbst.doc.
  65.  
  66.  
  67. %% BibTeX `plain' family
  68. %%       version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
  69. %%       Copyright (C) 1985, all rights reserved.
  70. %%       Copying of this file is authorized only if either
  71. %%       (1) you make absolutely no changes to your copy, including name, or
  72. %%       (2) if you do make changes, you name it something other than
  73. %%       btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  74. %%       This restriction helps ensure that all standard styles are identical.
  75. %%       The file btxbst.doc has the documentation for this style.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. ENTRY
  94.   { address
  95.     author
  96.     booktitle
  97.     chapter
  98.     edition
  99.     editor
  100.     howpublished
  101.     institution
  102.     isbn
  103.     issn
  104.     journal
  105.     key
  106.     month
  107.     note
  108.     number
  109.     organization
  110.     pages
  111.     publisher
  112.     school
  113.     series
  114.     title
  115.     type
  116.     volume
  117.     year
  118.   }
  119.   {}
  120.  
  121.   { label }
  122.  
  123.  
  124.  
  125. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  126.  
  127. FUNCTION {init.state.consts}
  128. { #0 'before.all :=
  129.   #1 'mid.sentence :=
  130.   #2 'after.sentence :=
  131.   #3 'after.block :=
  132. }
  133.  
  134.  
  135. STRINGS { s t }
  136.  
  137. FUNCTION {output.nonnull}
  138. { 's :=
  139.   output.state mid.sentence =
  140.     { ", " * write$ }
  141.     { output.state after.block =
  142.         { add.period$ write$
  143.           newline$
  144.           "\newblock " write$
  145.         }
  146.         { output.state before.all =
  147.             'write$
  148.             { add.period$ " " * write$ }
  149.           if$
  150.         }
  151.       if$
  152.       mid.sentence 'output.state :=
  153.     }
  154.   if$
  155.   s
  156. }
  157.  
  158. FUNCTION {output}
  159. { duplicate$ empty$
  160.     'pop$
  161.     'output.nonnull
  162.   if$
  163. }
  164.  
  165. FUNCTION {output.check}
  166. { 't :=
  167.   duplicate$ empty$
  168.     { pop$ "empty " t * " in " * cite$ * warning$ }
  169.     'output.nonnull
  170.   if$
  171. }
  172.  
  173. FUNCTION {output.bibitem}
  174. { newline$
  175.  
  176.   "\bibitem{" write$
  177.  
  178.   cite$ write$
  179.   "}" write$
  180.   newline$
  181.   ""
  182.   before.all 'output.state :=
  183. }
  184.  
  185.  
  186. FUNCTION {fin.entry}
  187. { add.period$
  188.   write$
  189.   newline$
  190. }
  191.  
  192. FUNCTION {new.block}
  193. { output.state before.all =
  194.     'skip$
  195.     { after.block 'output.state := }
  196.   if$
  197. }
  198.  
  199. FUNCTION {new.sentence}
  200. { output.state after.block =
  201.     'skip$
  202.     { output.state before.all =
  203.         'skip$
  204.         { after.sentence 'output.state := }
  205.       if$
  206.     }
  207.   if$
  208. }
  209.  
  210.  
  211. FUNCTION {not}
  212. {   { #0 }
  213.     { #1 }
  214.   if$
  215. }
  216.  
  217. FUNCTION {and}
  218. {   'skip$
  219.     { pop$ #0 }
  220.   if$
  221. }
  222.  
  223. FUNCTION {or}
  224. {   { pop$ #1 }
  225.     'skip$
  226.   if$
  227. }
  228.  
  229.  
  230. FUNCTION {new.block.checka}
  231. { empty$
  232.     'skip$
  233.     'new.block
  234.   if$
  235. }
  236.  
  237. FUNCTION {new.block.checkb}
  238. { empty$
  239.   swap$ empty$
  240.   and
  241.     'skip$
  242.     'new.block
  243.   if$
  244. }
  245.  
  246.  
  247. FUNCTION {new.sentence.checka}
  248. { empty$
  249.     'skip$
  250.     'new.sentence
  251.   if$
  252. }
  253.  
  254. FUNCTION {new.sentence.checkb}
  255. { empty$
  256.   swap$ empty$
  257.   and
  258.     'skip$
  259.     'new.sentence
  260.   if$
  261. }
  262.  
  263.  
  264. FUNCTION {field.or.null}
  265. { duplicate$ empty$
  266.     { pop$ "" }
  267.     'skip$
  268.   if$
  269. }
  270.  
  271. FUNCTION {emphasize}
  272. { duplicate$ empty$
  273.     { pop$ "" }
  274.     { "{\em " swap$ * "}" * }
  275.   if$
  276. }
  277.  
  278. INTEGERS { nameptr namesleft numnames }
  279.  
  280. FUNCTION {format.names}
  281. { 's :=
  282.   #1 'nameptr :=
  283.   s num.names$ 'numnames :=
  284.   numnames 'namesleft :=
  285.     { namesleft #0 > }
  286.  
  287.     { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't :=
  288.  
  289.       nameptr #1 >
  290.         { namesleft #1 >
  291.             { ", " * t * }
  292.             { numnames #2 >
  293.                 { "," * }
  294.                 'skip$
  295.               if$
  296.               t "others" =
  297.                 { " et~al." * }
  298.                 { " and " * t * }
  299.               if$
  300.             }
  301.           if$
  302.         }
  303.         't
  304.       if$
  305.       nameptr #1 + 'nameptr :=
  306.       namesleft #1 - 'namesleft :=
  307.     }
  308.   while$
  309. }
  310.  
  311. FUNCTION {format.authors}
  312. { author empty$
  313.     { "" }
  314.     { author format.names }
  315.   if$
  316. }
  317.  
  318. FUNCTION {format.editors}
  319. { editor empty$
  320.     { "" }
  321.     { editor format.names
  322.       editor num.names$ #1 >
  323.         { ", editors" * }
  324.         { ", editor" * }
  325.       if$
  326.     }
  327.   if$
  328. }
  329.  
  330. FUNCTION {format.isbn}
  331. { isbn empty$
  332.     { "" }
  333.     { new.block "ISBN " isbn * }
  334.   if$
  335. }
  336.  
  337. FUNCTION {format.issn}
  338. { issn empty$
  339.     { "" }
  340.     { new.block "ISSN " issn * }
  341.   if$
  342. }
  343.  
  344.  
  345. FUNCTION {format.title}
  346. { title empty$
  347.     { "" }
  348.  
  349.     { title "t" change.case$ }
  350.  
  351.   if$
  352. }
  353.  
  354.  
  355.  
  356. FUNCTION {n.dashify}
  357. { 't :=
  358.   ""
  359.     { t empty$ not }
  360.     { t #1 #1 substring$ "-" =
  361.         { t #1 #2 substring$ "--" = not
  362.             { "--" *
  363.               t #2 global.max$ substring$ 't :=
  364.             }
  365.             {   { t #1 #1 substring$ "-" = }
  366.                 { "-" *
  367.                   t #2 global.max$ substring$ 't :=
  368.                 }
  369.               while$
  370.             }
  371.           if$
  372.         }
  373.         { t #1 #1 substring$ *
  374.           t #2 global.max$ substring$ 't :=
  375.         }
  376.       if$
  377.     }
  378.   while$
  379. }
  380.  
  381.  
  382. FUNCTION {format.date}
  383. { year empty$
  384.     { month empty$
  385.         { "" }
  386.         { "there's a month but no year in " cite$ * warning$
  387.           month
  388.         }
  389.       if$
  390.     }
  391.     { month empty$
  392.         'year
  393.         { month " " * year * }
  394.       if$
  395.     }
  396.   if$
  397. }
  398.  
  399.  
  400. FUNCTION {format.btitle}
  401. { title emphasize
  402. }
  403.  
  404.  
  405. FUNCTION {tie.or.space.connect}
  406. { duplicate$ text.length$ #3 <
  407.     { "~" }
  408.     { " " }
  409.   if$
  410.   swap$ * *
  411. }
  412.  
  413.  
  414. FUNCTION {either.or.check}
  415. { empty$
  416.     'pop$
  417.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  418.   if$
  419. }
  420.  
  421.  
  422. FUNCTION {format.bvolume}
  423. { volume empty$
  424.     { "" }
  425.     { "volume" volume tie.or.space.connect
  426.       series empty$
  427.         'skip$
  428.         { " of " * series emphasize * }
  429.       if$
  430.       "volume and number" number either.or.check
  431.     }
  432.   if$
  433. }
  434.  
  435.  
  436. FUNCTION {format.number.series}
  437. { volume empty$
  438.     { number empty$
  439.         { series field.or.null }
  440.         { output.state mid.sentence =
  441.             { "number" }
  442.             { "Number" }
  443.           if$
  444.           number tie.or.space.connect
  445.           series empty$
  446.             { "there's a number but no series in " cite$ * warning$ }
  447.             { " in " * series * }
  448.           if$
  449.         }
  450.       if$
  451.     }
  452.     { "" }
  453.   if$
  454. }
  455.  
  456.  
  457. FUNCTION {format.edition}
  458. { edition empty$
  459.     { "" }
  460.     { output.state mid.sentence =
  461.         { edition "l" change.case$ " edition" * }
  462.         { edition "t" change.case$ " edition" * }
  463.       if$
  464.     }
  465.   if$
  466. }
  467.  
  468.  
  469. INTEGERS { multiresult }
  470.  
  471. FUNCTION {multi.page.check}
  472. { 't :=
  473.   #0 'multiresult :=
  474.     { multiresult not
  475.       t empty$ not
  476.       and
  477.     }
  478.     { t #1 #1 substring$
  479.       duplicate$ "-" =
  480.       swap$ duplicate$ "," =
  481.       swap$ "+" =
  482.       or or
  483.         { #1 'multiresult := }
  484.         { t #2 global.max$ substring$ 't := }
  485.       if$
  486.     }
  487.   while$
  488.   multiresult
  489. }
  490.  
  491.  
  492. FUNCTION {format.pages}
  493. { pages empty$
  494.     { "" }
  495.     { pages multi.page.check
  496.         { "pages" pages n.dashify tie.or.space.connect }
  497.         { "page" pages tie.or.space.connect }
  498.       if$
  499.     }
  500.   if$
  501. }
  502.  
  503.  
  504. FUNCTION {format.vol.num.pages}
  505. { volume field.or.null
  506.   number empty$
  507.     'skip$
  508.     { "\penalty0 (" number * ")" * *
  509.       volume empty$
  510.         { "there's a number but no volume in " cite$ * warning$ }
  511.         'skip$
  512.       if$
  513.     }
  514.   if$
  515.   pages empty$
  516.     'skip$
  517.     { duplicate$ empty$
  518.         { pop$ format.pages }
  519.         { ":\penalty0 " * pages n.dashify * }
  520.       if$
  521.     }
  522.   if$
  523. }
  524.  
  525.  
  526.  
  527. FUNCTION {format.chapter.pages}
  528. { chapter empty$
  529.     'format.pages
  530.     { type empty$
  531.         { "chapter" }
  532.         { type "l" change.case$ }
  533.       if$
  534.       chapter tie.or.space.connect
  535.       pages empty$
  536.         'skip$
  537.         { ", " * format.pages * }
  538.       if$
  539.     }
  540.   if$
  541. }
  542.  
  543.  
  544. FUNCTION {format.in.ed.booktitle}
  545. { booktitle empty$
  546.     { "" }
  547.     { editor empty$
  548.         { "In " booktitle emphasize * }
  549.         { "In " format.editors * ", " * booktitle emphasize * }
  550.       if$
  551.     }
  552.   if$
  553. }
  554.  
  555.  
  556. FUNCTION {empty.misc.check}
  557. { author empty$ title empty$ howpublished empty$
  558.   month empty$ year empty$ note empty$
  559.   and and and and and
  560.  
  561.   key empty$ not and
  562.  
  563.     { "all relevant fields are empty in " cite$ * warning$ }
  564.     'skip$
  565.   if$
  566. }
  567.  
  568.  
  569. FUNCTION {format.thesis.type}
  570. { type empty$
  571.     'skip$
  572.     { pop$
  573.       type "t" change.case$
  574.     }
  575.   if$
  576. }
  577.  
  578.  
  579. FUNCTION {format.tr.number}
  580. { type empty$
  581.     { "Technical Report" }
  582.     'type
  583.   if$
  584.   number empty$
  585.     { "t" change.case$ }
  586.     { number tie.or.space.connect }
  587.   if$
  588. }
  589.  
  590.  
  591. FUNCTION {format.article.crossref}
  592. { key empty$
  593.     { journal empty$
  594.         { "need key or journal for " cite$ * " to crossref " * crossref *
  595.           warning$
  596.           ""
  597.         }
  598.         { "In {\em " journal * "\/}" * }
  599.       if$
  600.     }
  601.     { "In " key * }
  602.   if$
  603.   " \cite{" * crossref * "}" *
  604. }
  605.  
  606.  
  607. FUNCTION {format.crossref.editor}
  608. { editor #1 "{vv~}{ll}" format.name$
  609.   editor num.names$ duplicate$
  610.   #2 >
  611.     { pop$ " et~al." * }
  612.     { #2 <
  613.         'skip$
  614.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  615.             { " et~al." * }
  616.             { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  617.           if$
  618.         }
  619.       if$
  620.     }
  621.   if$
  622. }
  623.  
  624.  
  625. FUNCTION {format.book.crossref}
  626. { volume empty$
  627.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  628.       "In "
  629.     }
  630.     { "Volume" volume tie.or.space.connect
  631.       " of " *
  632.     }
  633.   if$
  634.   editor empty$
  635.   editor field.or.null author field.or.null =
  636.   or
  637.     { key empty$
  638.         { series empty$
  639.             { "need editor, key, or series for " cite$ * " to crossref " *
  640.               crossref * warning$
  641.               "" *
  642.             }
  643.             { "{\em " * series * "\/}" * }
  644.           if$
  645.         }
  646.         { key * }
  647.       if$
  648.     }
  649.     { format.crossref.editor * }
  650.   if$
  651.   " \cite{" * crossref * "}" *
  652. }
  653.  
  654.  
  655. FUNCTION {format.incoll.inproc.crossref}
  656. { editor empty$
  657.   editor field.or.null author field.or.null =
  658.   or
  659.     { key empty$
  660.         { booktitle empty$
  661.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  662.               crossref * warning$
  663.               ""
  664.             }
  665.             { "In {\em " booktitle * "\/}" * }
  666.           if$
  667.         }
  668.         { "In " key * }
  669.       if$
  670.     }
  671.     { "In " format.crossref.editor * }
  672.   if$
  673.   " \cite{" * crossref * "}" *
  674. }
  675.  
  676.  
  677. FUNCTION {article}
  678. { output.bibitem
  679.   format.authors "author" output.check
  680.   new.block
  681.   format.title "title" output.check
  682.   new.block
  683.   crossref missing$
  684.     { journal emphasize "journal" output.check
  685.       format.vol.num.pages output
  686.       format.date "year" output.check
  687.     }
  688.     { format.article.crossref output.nonnull
  689.       format.pages output
  690.     }
  691.   if$
  692.   new.block
  693.   note output
  694.   fin.entry
  695. }
  696.  
  697. FUNCTION {book}
  698. { output.bibitem
  699.   author empty$
  700.     { format.editors "author and editor" output.check }
  701.     { format.authors output.nonnull
  702.       crossref missing$
  703.         { "author and editor" editor either.or.check }
  704.         'skip$
  705.       if$
  706.     }
  707.   if$
  708.   new.block
  709.   format.btitle "title" output.check
  710.   crossref missing$
  711.     { format.bvolume output
  712.       new.block
  713.       format.number.series output
  714.       new.sentence
  715.       publisher "publisher" output.check
  716.       address output
  717.     }
  718.     { new.block
  719.       format.book.crossref output.nonnull
  720.     }
  721.   if$
  722.   format.edition output
  723.   format.date "year" output.check
  724.   format.isbn output
  725.   new.block
  726.   note output
  727.   fin.entry
  728. }
  729.  
  730.  
  731. FUNCTION {booklet}
  732. { output.bibitem
  733.   format.authors output
  734.   new.block
  735.   format.title "title" output.check
  736.   howpublished address new.block.checkb
  737.   howpublished output
  738.   address output
  739.   format.date output
  740.   format.isbn output
  741.   new.block
  742.   note output
  743.   fin.entry
  744. }
  745.  
  746.  
  747.  
  748. FUNCTION {inbook}
  749. { output.bibitem
  750.   author empty$
  751.     { format.editors "author and editor" output.check }
  752.     { format.authors output.nonnull
  753.       crossref missing$
  754.         { "author and editor" editor either.or.check }
  755.         'skip$
  756.       if$
  757.     }
  758.   if$
  759.   new.block
  760.   format.btitle "title" output.check
  761.   crossref missing$
  762.     { format.bvolume output
  763.       format.chapter.pages "chapter and pages" output.check
  764.       new.block
  765.       format.number.series output
  766.       new.sentence
  767.       publisher "publisher" output.check
  768.       address output
  769.     }
  770.     { format.chapter.pages "chapter and pages" output.check
  771.       new.block
  772.       format.book.crossref output.nonnull
  773.     }
  774.   if$
  775.   format.edition output
  776.   format.date "year" output.check
  777.   format.isbn output
  778.   new.block
  779.   note output
  780.   fin.entry
  781. }
  782.  
  783.  
  784. FUNCTION {incollection}
  785. { output.bibitem
  786.   format.authors "author" output.check
  787.   new.block
  788.   format.title "title" output.check
  789.   new.block
  790.   crossref missing$
  791.     { format.in.ed.booktitle "booktitle" output.check
  792.       format.bvolume output
  793.       format.number.series output
  794.       format.chapter.pages output
  795.       new.sentence
  796.       publisher "publisher" output.check
  797.       address output
  798.       format.edition output
  799.       format.date "year" output.check
  800.     }
  801.     { format.incoll.inproc.crossref output.nonnull
  802.       format.chapter.pages output
  803.     }
  804.   if$
  805.   format.isbn output
  806.   new.block
  807.   note output
  808.   fin.entry
  809. }
  810.  
  811.  
  812. FUNCTION {inproceedings}
  813. { output.bibitem
  814.   format.authors "author" output.check
  815.   new.block
  816.   format.title "title" output.check
  817.   new.block
  818.   crossref missing$
  819.     { format.in.ed.booktitle "booktitle" output.check
  820.       format.bvolume output
  821.       format.number.series output
  822.       format.pages output
  823.       address empty$
  824.         { organization publisher new.sentence.checkb
  825.           organization output
  826.           publisher output
  827.           format.date "year" output.check
  828.         }
  829.         { address output.nonnull
  830.           format.date "year" output.check
  831.           new.sentence
  832.           organization output
  833.           publisher output
  834.         }
  835.       if$
  836.     }
  837.     { format.incoll.inproc.crossref output.nonnull
  838.       format.pages output
  839.     }
  840.   if$
  841.   format.isbn output
  842.   new.block
  843.   note output
  844.   fin.entry
  845. }
  846.  
  847.  
  848. FUNCTION {conference} { inproceedings }
  849.  
  850.  
  851. FUNCTION {manual}
  852. { output.bibitem
  853.   author empty$
  854.     { organization empty$
  855.         'skip$
  856.         { organization output.nonnull
  857.           address output
  858.         }
  859.       if$
  860.     }
  861.     { format.authors output.nonnull }
  862.   if$
  863.   new.block
  864.   format.btitle "title" output.check
  865.   author empty$
  866.     { organization empty$
  867.         { address new.block.checka
  868.           address output
  869.         }
  870.         'skip$
  871.       if$
  872.     }
  873.     { organization address new.block.checkb
  874.       organization output
  875.       address output
  876.     }
  877.   if$
  878.   format.edition output
  879.   format.date output
  880.   new.block
  881.   note output
  882.   fin.entry
  883. }
  884.  
  885.  
  886. FUNCTION {mastersthesis}
  887. { output.bibitem
  888.   format.authors "author" output.check
  889.   new.block
  890.   format.title "title" output.check
  891.   new.block
  892.   "Master's thesis" format.thesis.type output.nonnull
  893.   school "school" output.check
  894.   address output
  895.   format.date "year" output.check
  896.   new.block
  897.   note output
  898.   fin.entry
  899. }
  900.  
  901.  
  902. FUNCTION {misc}
  903. { output.bibitem
  904.   format.authors output
  905.   title howpublished new.block.checkb
  906.   format.title output
  907.   howpublished new.block.checka
  908.   howpublished output
  909.   format.date output
  910.   format.issn output
  911.   new.block
  912.   note output
  913.   fin.entry
  914.   empty.misc.check
  915. }
  916.  
  917.  
  918. FUNCTION {phdthesis}
  919. { output.bibitem
  920.   format.authors "author" output.check
  921.   new.block
  922.   format.btitle "title" output.check
  923.   new.block
  924.   "PhD thesis" format.thesis.type output.nonnull
  925.   school "school" output.check
  926.   address output
  927.   format.date "year" output.check
  928.   new.block
  929.   note output
  930.   fin.entry
  931. }
  932.  
  933.  
  934. FUNCTION {periodical}
  935. { output.bibitem
  936.   editor empty$
  937.     { organization output }
  938.     { format.editors output.nonnull }
  939.   if$
  940.   new.block
  941.   title emphasize "title" output.check
  942.   format.vol.num.pages output
  943.   format.date output
  944.   format.issn output
  945.   new.sentence
  946.   publisher output
  947.   address output
  948.   howpublished new.block.checka
  949.   howpublished output
  950.   new.block
  951.   note output
  952.   fin.entry
  953. }
  954.  
  955.  
  956. FUNCTION {proceedings}
  957. { output.bibitem
  958.   editor empty$
  959.     { organization output }
  960.     { format.editors output.nonnull }
  961.   if$
  962.   new.block
  963.   format.btitle "title" output.check
  964.   format.bvolume output
  965.   format.number.series output
  966.   address empty$
  967.     { editor empty$
  968.         { publisher new.sentence.checka }
  969.         { organization publisher new.sentence.checkb
  970.           organization output
  971.         }
  972.       if$
  973.       publisher output
  974.       format.date "year" output.check
  975.     }
  976.     { address output.nonnull
  977.       format.date "year" output.check
  978.       new.sentence
  979.       editor empty$
  980.         'skip$
  981.         { organization output }
  982.       if$
  983.       publisher output
  984.     }
  985.   if$
  986.   format.isbn output
  987.   new.block
  988.   note output
  989.   fin.entry
  990. }
  991.  
  992.  
  993. FUNCTION {techreport}
  994. { output.bibitem
  995.   format.authors "author" output.check
  996.   new.block
  997.   format.title "title" output.check
  998.   new.block
  999.   format.tr.number output.nonnull
  1000.   institution "institution" output.check
  1001.   address output
  1002.   format.date "year" output.check
  1003.   new.block
  1004.   note output
  1005.   fin.entry
  1006. }
  1007.  
  1008.  
  1009. FUNCTION {unpublished}
  1010. { output.bibitem
  1011.   format.authors "author" output.check
  1012.   new.block
  1013.   format.title "title" output.check
  1014.   new.block
  1015.   note "note" output.check
  1016.   format.date output
  1017.   fin.entry
  1018. }
  1019.  
  1020.  
  1021. FUNCTION {default.type} { misc }
  1022.  
  1023.  
  1024.  
  1025.  
  1026. MACRO {jan} {"Jan."}
  1027.  
  1028. MACRO {feb} {"Feb."}
  1029.  
  1030. MACRO {mar} {"Mar."}
  1031.  
  1032. MACRO {apr} {"Apr."}
  1033.  
  1034. MACRO {may} {"May"}
  1035.  
  1036. MACRO {jun} {"June"}
  1037.  
  1038. MACRO {jul} {"July"}
  1039.  
  1040. MACRO {aug} {"Aug."}
  1041.  
  1042. MACRO {sep} {"Sept."}
  1043.  
  1044. MACRO {oct} {"Oct."}
  1045.  
  1046. MACRO {nov} {"Nov."}
  1047.  
  1048. MACRO {dec} {"Dec."}
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055. MACRO {acmcs} {"ACM Comput. Surv."}
  1056.  
  1057. MACRO {acta} {"Acta Inf."}
  1058.  
  1059. MACRO {cacm} {"Commun. ACM"}
  1060.  
  1061. MACRO {ibmjrd} {"IBM J. Res. Dev."}
  1062.  
  1063. MACRO {ibmsj} {"IBM Syst.~J."}
  1064.  
  1065. MACRO {ieeese} {"IEEE Trans. Softw. Eng."}
  1066.  
  1067. MACRO {ieeetc} {"IEEE Trans. Comput."}
  1068.  
  1069. MACRO {ieeetcad}
  1070.  {"IEEE Trans. Comput.-Aided Design Integrated Circuits"}
  1071.  
  1072. MACRO {ipl} {"Inf. Process. Lett."}
  1073.  
  1074. MACRO {jacm} {"J.~ACM"}
  1075.  
  1076. MACRO {jcss} {"J.~Comput. Syst. Sci."}
  1077.  
  1078. MACRO {scp} {"Sci. Comput. Programming"}
  1079.  
  1080. MACRO {sicomp} {"SIAM J. Comput."}
  1081.  
  1082. MACRO {tocs} {"ACM Trans. Comput. Syst."}
  1083.  
  1084. MACRO {tods} {"ACM Trans. Database Syst."}
  1085.  
  1086. MACRO {tog} {"ACM Trans. Gr."}
  1087.  
  1088. MACRO {toms} {"ACM Trans. Math. Softw."}
  1089.  
  1090. MACRO {toois} {"ACM Trans. Office Inf. Syst."}
  1091.  
  1092. MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."}
  1093.  
  1094. MACRO {tcs} {"Theoretical Comput. Sci."}
  1095.  
  1096.  
  1097.  
  1098.  
  1099. READ
  1100.  
  1101.  
  1102.  
  1103.  
  1104. FUNCTION {sortify}
  1105. { purify$
  1106.   "l" change.case$
  1107. }
  1108.  
  1109. INTEGERS { len }
  1110.  
  1111. FUNCTION {chop.word}
  1112. { 's :=
  1113.   'len :=
  1114.   s #1 len substring$ =
  1115.     { s len #1 + global.max$ substring$ }
  1116.     's
  1117.   if$
  1118. }
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128. FUNCTION {sort.format.names}
  1129. { 's :=
  1130.   #1 'nameptr :=
  1131.   ""
  1132.   s num.names$ 'numnames :=
  1133.   numnames 'namesleft :=
  1134.     { namesleft #0 > }
  1135.     { nameptr #1 >
  1136.         { "   " * }
  1137.         'skip$
  1138.       if$
  1139.  
  1140.       s nameptr "{vv{ } }{ll{ }}{  f{ }}{  jj{ }}" format.name$ 't :=
  1141.  
  1142.       nameptr numnames = t "others" = and
  1143.         { "et al" * }
  1144.         { t sortify * }
  1145.       if$
  1146.       nameptr #1 + 'nameptr :=
  1147.       namesleft #1 - 'namesleft :=
  1148.     }
  1149.   while$
  1150. }
  1151.  
  1152.  
  1153. FUNCTION {sort.format.title}
  1154. { 't :=
  1155.   "A " #2
  1156.     "An " #3
  1157.       "The " #4 t chop.word
  1158.     chop.word
  1159.   chop.word
  1160.   sortify
  1161.   #1 global.max$ substring$
  1162. }
  1163.  
  1164.  
  1165. FUNCTION {author.sort}
  1166. { author empty$
  1167.     { key empty$
  1168.         { "to sort, need author or key in " cite$ * warning$
  1169.           ""
  1170.         }
  1171.         { key sortify }
  1172.       if$
  1173.     }
  1174.     { author sort.format.names }
  1175.   if$
  1176. }
  1177.  
  1178. FUNCTION {author.editor.sort}
  1179. { author empty$
  1180.     { editor empty$
  1181.         { key empty$
  1182.             { "to sort, need author, editor, or key in " cite$ * warning$
  1183.               ""
  1184.             }
  1185.             { key sortify }
  1186.           if$
  1187.         }
  1188.         { editor sort.format.names }
  1189.       if$
  1190.     }
  1191.     { author sort.format.names }
  1192.   if$
  1193. }
  1194.  
  1195. FUNCTION {author.organization.sort}
  1196. { author empty$
  1197.     { organization empty$
  1198.         { key empty$
  1199.             { "to sort, need author, organization, or key in " cite$ * warning$
  1200.               ""
  1201.             }
  1202.             { key sortify }
  1203.           if$
  1204.         }
  1205.         { "The " #4 organization chop.word sortify }
  1206.       if$
  1207.     }
  1208.     { author sort.format.names }
  1209.   if$
  1210. }
  1211.  
  1212. FUNCTION {editor.organization.sort}
  1213. { editor empty$
  1214.     { organization empty$
  1215.         { key empty$
  1216.             { "to sort, need editor, organization, or key in " cite$ * warning$
  1217.               ""
  1218.             }
  1219.             { key sortify }
  1220.           if$
  1221.         }
  1222.         { "The " #4 organization chop.word sortify }
  1223.       if$
  1224.     }
  1225.     { editor sort.format.names }
  1226.   if$
  1227. }
  1228.  
  1229.  
  1230. FUNCTION {presort}
  1231.  
  1232. { type$ "book" =
  1233.  
  1234.   type$ "inbook" =
  1235.   or
  1236.     'author.editor.sort
  1237.     { type$ "proceedings" =
  1238.         'editor.organization.sort
  1239.         { type$ "manual" =
  1240.             'author.organization.sort
  1241.             'author.sort
  1242.           if$
  1243.         }
  1244.       if$
  1245.     }
  1246.   if$
  1247.  
  1248.   "    "
  1249.   *
  1250.   year field.or.null sortify
  1251.   *
  1252.   "    "
  1253.   *
  1254.   title field.or.null
  1255.   sort.format.title
  1256.   *
  1257.   #1 entry.max$ substring$
  1258.   'sort.key$ :=
  1259. }
  1260.  
  1261. ITERATE {presort}
  1262.  
  1263.  
  1264. SORT
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272. STRINGS { longest.label }
  1273.  
  1274. INTEGERS { number.label longest.label.width }
  1275.  
  1276. FUNCTION {initialize.longest.label}
  1277. { "" 'longest.label :=
  1278.   #1 'number.label :=
  1279.   #0 'longest.label.width :=
  1280. }
  1281.  
  1282. FUNCTION {longest.label.pass}
  1283. { number.label int.to.str$ 'label :=
  1284.   number.label #1 + 'number.label :=
  1285.   label width$ longest.label.width >
  1286.     { label 'longest.label :=
  1287.       label width$ 'longest.label.width :=
  1288.     }
  1289.     'skip$
  1290.   if$
  1291. }
  1292.  
  1293. EXECUTE {initialize.longest.label}
  1294.  
  1295. ITERATE {longest.label.pass}
  1296.  
  1297.  
  1298.  
  1299.  
  1300. FUNCTION {begin.bib}
  1301.  
  1302. { preamble$ empty$
  1303.  
  1304.     'skip$
  1305.     { preamble$ write$ newline$ }
  1306.   if$
  1307.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1308. }
  1309.  
  1310. EXECUTE {begin.bib}
  1311.  
  1312. EXECUTE {init.state.consts}
  1313.  
  1314.  
  1315. ITERATE {call.type$}
  1316.  
  1317.  
  1318. FUNCTION {end.bib}
  1319. { newline$
  1320.   "\end{thebibliography}" write$ newline$
  1321. }
  1322.  
  1323. EXECUTE {end.bib}
  1324.